﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Transportr
{
    public class StationItemViewModel : BaseItemViewModel
    {
        private ServiceModel.StationLine rawData;

        public ServiceModel.StationLine RawData
        {
            private get { return rawData; }
            set
            {
                rawData = value;
                NotifyPropertyChanged("stId");
                NotifyPropertyChanged("LineNumber");
                NotifyPropertyChanged("StationName");
                NotifyPropertyChanged("Company");
                NotifyPropertyChanged("EndStationName");
                NotifyPropertyChanged("LineTypeIconPath");
            }
        }

        public int stId
        {
            get { return RawData.stId; }
        }

        public string LineNumber
        {
            get { return RawData.lnNumber; }
        }

        public string StationName
        {
            get { return RawData.stName; }
        }
        public string Company
        {
            get { return RawData.coName; }
        }
        public string EndStationName
        {
            get { return RawData.EndStations.stName; }
        }
        public string LineTypeIconPath
        {
            get { return Icon.Vehicle((ServiceModel.VehicleType)RawData.ltId); }
        }
    }
}
